package com.dashu.core.controller;

import com.dashu.base.enums.ReplRyCode;
import com.dashu.core.dto.company.HomeInfoDTO;
import com.dashu.core.result.ResultBean;
import com.dashu.core.dto.company.CompanyDTO;
import com.dashu.core.service.CompanyPersonalService;
import com.dashu.core.service.CompanyService;
import com.dashu.core.service.CompanyTeacherService;
import com.dashu.core.service.HomeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @Author xys
 * @Date 2020/11/17 15:21
 */

@RequestMapping("dashu/home")
@RestController
@Slf4j
@Api(value = "dashu/home", tags = {"首页模块"}, description = "后台")
public class
HomeController {

    @Autowired
    private HomeService homeService;


    @PostMapping("/info")
    @ApiOperation(value = "首页信息", notes = "首页信息")
    public ResultBean<HomeInfoDTO> addCompany() throws Exception {
        return new ResultBean<>(ReplRyCode.SUCCESS.getCode(), "首页信息", homeService.homeInfo());
    }

}
